package com.csc.banking.domain;

import java.util.Collection;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="systemusers")
public class SystemUser {
	
	@Id
	
	private String userName;
	private String password; 
//	private Integer roleName;
	
	@ManyToOne
	@JoinColumn(name="roleName")
	private Role roles;
	
	@OneToMany(mappedBy="systemusers")
	private Collection<SavingTransaction> savingtransactions;
	
	
	
	
	
//	public Integer getUserId() {
//		return userId;
//	}
//
//	public void setUserId(Integer userId) {
//		this.userId = userId;
//	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

//	public Integer getRoleName() {
//		return roleName;
//	}
//
//	public void setRoleName(Integer roleName) {
//		this.roleName = roleName;
//	}

	public Role getRoles() {
		return roles;
	}

	public void setRoles(Role roles) {
		this.roles = roles;
	}

	public Collection<SavingTransaction> getSavingtransactions() {
		return savingtransactions;
	}

	public void setSavingtransactions(
			Collection<SavingTransaction> savingtransactions) {
		this.savingtransactions = savingtransactions;
	}



}
